#! /usr/bin/env python
# -*- coding:utf-8 -*-
# Author Jmz

num1 = 4
num2 = 4.3
num3 = '4'
num4 = '3.4'


# print(num1.isdigit())  # 报错，必须是字符串可以
# print(num2.isdigit())  # 报错，必须是字符串可以
print(num4.isdigit())   # True
print(num3.isdigit())   # False



# print(num1.isnumeric())  # 也不能是数字
# print(num2.isnumeric())  # 也不能是数字
print(num3.isnumeric())    # True
print(num4.isnumeric())    # False


# print(num1.isdecimal())   # 也不能是数字
# print(num2.isdecimal())   # 也不能是数字
print(num3.isdecimal())    # True
print(num4.isdecimal())     # False



if type(num1) is int:   # 对的
    print('对的')



print(num4.replace('.','').isdigit())  # True





